﻿using System;

// The Templated Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234235

namespace InterfaceXAML.Utilities
{
    public static class Utilities
    {
        private static int _currentYear = DateTime.Now.Year;
        private static int _currentMonth = DateTime.Now.Month;
        private static int _currentDay = DateTime.Now.Day;

        public static int CurrentYear
        {
            get { return _currentYear; }
            set { _currentYear =  value;  }
        }

        public static int CurrentMonth
        {
            get { return _currentMonth; }
            set { _currentMonth = value; }
        }

        public static int CurrentDay
        {
            get { return _currentDay; }
            set { _currentDay = value; }
        }

        public static int LockCollaborateur { get; set; }

        public static int LockProject { get; set; }

        public static int GetRealDayOfWeek(int dateOfWeek)
        {
            dateOfWeek--;

            if (dateOfWeek == -1)
                dateOfWeek = 6;

            return dateOfWeek;
        }
    }
}
